<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    x:Class="OpenLS.Chart.UI.Chart3DViewportResources"
    xmlns:chartui="clr-namespace:OpenLS.Chart.UI"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    
    xmlns:Internals="clr-namespace:OpenLS.Chart.UI.Internals">
    <Style TargetType="{x:Type Viewport3D}" x:Key="viewport3DStyle">
        <Setter Property="chartui:ChartElement.ChartAreaOwner" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}"/>
        <EventSetter Event="MouseDown" Handler="OnMouseDown"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
       <!-- <Setter Property="Background" Value="{x:Null}"/> -->
        <Setter Property="Camera">
            <Setter.Value>
                <MultiBinding Converter="{x:Static Internals:ChartConverters.CameraConverter}">
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.ChartArea).View3D.RotationX"></Binding>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.ChartArea).View3D.RotationY"></Binding>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.XAxisInfo).Minimum"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.XAxisInfo).Maximum"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.YAxisInfo).Minimum"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.YAxisInfo).Maximum"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.ZAxisInfo).Minimum"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.ZAxisInfo).Maximum"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.ChartArea)"></Binding>
                    <Binding Source="camera2"></Binding>
                </MultiBinding>

            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>